using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;
using CommonTypes.Math ;
using BuildingBasicDomain;


namespace MVCFramework.View
{
    public abstract class SnapPoint: IPoint,ISelectable 
    {
        private List<IGeometry> relatedObjects = new List<IGeometry>();

        public List<IGeometry> RelatedObjects
        {
            get { return relatedObjects; }
            set { relatedObjects = value; }
        }
        public void AddRelation (IGeometry  _object )
        {
            RelatedObjects.Add(_object);
        }

        public SnapPoint() {  }

        public Vector3D V
        {
            get
            {
                return new Vector3D(new double[] { X, Y, Z });
            }
            set
            {
                throw new NotImplementedException("Are you serious");
                X = value.X;
                Y = value.Y;
                Z = value.Z;
            }
        }
        public abstract double X { get; set;}
        public abstract double Y { get; set;}
        public abstract double Z { get; set;}
        public abstract double this[int i] { get; set;}

        public double distancePoint(IPoint point) 
        {
            return point.distancePoint(this);
        }

        #region ISelectable Members
        bool isSelected;
        public bool IsSelected
        {
            get
            {
                return isSelected; 
            }
            set
            {
                isSelected = value;
            }
        }

        #endregion

    }




}
